 
<header id="header" class="mui-bar mui-bar-black mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left" href="{:url('user/index')}"></a>
    <h1 class="mui-title">进度列表</h1>
</header>
<div class="mui-content mui-content-my projectList">
    <div class="search" id="showUserPicker">
       <p><span id="userResult">{$building_name} </span><i class="mui-icon mui-icon-arrowdown"></i></p>
    </div>
    <div class="mui-row">
        <div class="listnav mui-col-xs-3">
            <div>
                <a href="#">时间</a>
            </div>
        </div>
        <div class="listnav mui-col-xs-3">
            <div>
                <a href="#">工种名称</a>
            </div>
        </div>
        <div class="listnav mui-col-xs-3">
            <div>
                <a href="#"> 负责人</a>
            </div>
        </div>
        <div class="listnav mui-col-xs-3">
            <div>
                <a href="#"><?php  if($progress_status == '0'){echo '进行中';}elseif($progress_status == '1'){echo '完工';}else{echo '状态';}?> <i class="icon_down1"></i></a>
                <div class="good_nav_sub1">
                    <div class="pop">
                        <ul>
                            <li><a href="/index/site/schedule_list.html">全部</a></li>
                            <li><a href="/index/site/schedule_list/site_id/{$site_id}/progress_status/0.html">进行中</a></li>
                            <li><a href="/index/site/schedule_list/site_id/{$site_id}/progress_status/1.html">完工</a></li> 
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <table class="schedule-list">
        {volist name="result.rows" id="vv"}  
        <tr>
            
            <td><?php echo date("Y-m-d",$vv['progress_add_time'])?></td>
            <td><a href="{:url('site/schedule_detail',array('id'=>$vv['id']))}"><?php if($vv['progress_type'] ==1){echo '工地进度'; }else{echo '结算单';} ?></a></td>
            <td>{$vv.user_name}</td>
            <td class="<?php if($vv['progress_status'] ==0){echo 'blue'; } ?>"><?php if($vv['progress_status'] ==0){echo '进行中'; }else{echo '完工';} ?></td>
        </tr>
        {/volist} 
    </table>
</div>
<div class="mui-content-padded btn-bottom-fixed"><a href="{:url('site/schedule_add')}">
    <button style="background: linear-gradient(-90deg, #3383FD, #78C2FF);border: none" type="button" class="mui-btn mui-btn-primary mui-btn-block">＋ 新增</button></a>
</div>
<script src="__CDN__/style/js/jquery-1.11.3.js"></script>
<script src="__CDN__/style/js/mui.poppicker.js"></script>
<script src="__CDN__/style/js/mui.picker.min.js"></script>
<script>
    $('.projectList .mui-col-xs-3>div').click(function () {
        $(this).parents(".mui-col-xs-3").siblings().children().children('.good_nav_sub1').css('display','none');
        if ($(this).children('.good_nav_sub1').css('display')==='none')
            $(this).children('.good_nav_sub1').css('display','block');
        else
            $(this).children('.good_nav_sub1').css('display','none');

    });
    function selectEq(a) {
        $(a).each(function () {
            if($(this).index()%2===0){
                $(this).css({'background-color':"#fff"});
            }
        })
    }
    selectEq('.schedule-list tr');
    (function ($,doc) {
        var userPicker = new $.PopPicker();
        userPicker.setData({$siteList});
        var showUserPickerButton = doc.getElementById('showUserPicker');
        var userResult = doc.getElementById('userResult');
        showUserPickerButton.addEventListener('tap', function(event) {
            userPicker.show(function(items) {
                var rul= JSON.stringify(items[0].value);
                // var rula=rul.replace('"','').replace('"','');
                // userResult.innerHTML = rula;
                location.href="/index/site/schedule_list/site_id/"+rul+".html";
                
                //返回 false 可以阻止选择框的关闭
                //return false;
            });
        }, false);
    })(mui,document);
</script>
 